\(\int \frac {\tan (e+f x)}{a+b \sec ^3(e+f x)} \, dx\) [459]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 23 \[ \int \frac {\tan (e+f x)}{a+b \sec ^3(e+f x)} \, dx=-\frac {\log \left (b+a \cos ^3(e+f x)\right )}{3 a f} \]

[Out]

-1/3*ln(b+a*cos(f*x+e)^3)/a/f

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {4223, 266} \[ \int \frac {\tan (e+f x)}{a+b \sec ^3(e+f x)} \, dx=-\frac {\log \left (a \cos ^3(e+f x)+b\right )}{3 a f} \]

[In]

Int[Tan[e + f*x]/(a + b*Sec[e + f*x]^3),x]

[Out]

-1/3*Log[b + a*Cos[e + f*x]^3]/(a*f)

Rule 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 4223

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*tan[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> Module[{ff =
 FreeFactors[Cos[e + f*x], x]}, Dist[-(f*ff^(m + n*p - 1))^(-1), Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*((b + a*
(ff*x)^n)^p/x^(m + n*p)), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[(m - 1)/2] &&
IntegerQ[n] && IntegerQ[p]

Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {x^2}{b+a x^3} \, dx,x,\cos (e+f x)\right )}{f} \\ & = -\frac {\log \left (b+a \cos ^3(e+f x)\right )}{3 a f} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00 \[ \int \frac {\tan (e+f x)}{a+b \sec ^3(e+f x)} \, dx=-\frac {\log \left (b+a \cos ^3(e+f x)\right )}{3 a f} \]

[In]

Integrate[Tan[e + f*x]/(a + b*Sec[e + f*x]^3),x]

[Out]

-1/3*Log[b + a*Cos[e + f*x]^3]/(a*f)

Maple [A] (verified)

Time = 1.70 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.52

method result size
derivativedivides \(\frac {\frac {\ln \left (\sec \left (f x +e \right )\right )}{a}-\frac {\ln \left (a +b \sec \left (f x +e \right )^{3}\right )}{3 a}}{f}\) \(35\)
default \(\frac {\frac {\ln \left (\sec \left (f x +e \right )\right )}{a}-\frac {\ln \left (a +b \sec \left (f x +e \right )^{3}\right )}{3 a}}{f}\) \(35\)
risch \(\frac {i x}{a}+\frac {2 i e}{a f}-\frac {\ln \left ({\mathrm e}^{6 i \left (f x +e \right )}+3 \,{\mathrm e}^{4 i \left (f x +e \right )}+\frac {8 b \,{\mathrm e}^{3 i \left (f x +e \right )}}{a}+3 \,{\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{3 a f}\) \(76\)

[In]

int(tan(f*x+e)/(a+b*sec(f*x+e)^3),x,method=_RETURNVERBOSE)

[Out]

1/f*(1/a*ln(sec(f*x+e))-1/3/a*ln(a+b*sec(f*x+e)^3))

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.91 \[ \int \frac {\tan (e+f x)}{a+b \sec ^3(e+f x)} \, dx=-\frac {\log \left (a \cos \left (f x + e\right )^{3} + b\right )}{3 \, a f} \]

[In]

integrate(tan(f*x+e)/(a+b*sec(f*x+e)^3),x, algorithm="fricas")

[Out]

-1/3*log(a*cos(f*x + e)^3 + b)/(a*f)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 139 vs. \(2 (19) = 38\).

Time = 18.05 (sec) , antiderivative size = 139, normalized size of antiderivative = 6.04 \[ \int \frac {\tan (e+f x)}{a+b \sec ^3(e+f x)} \, dx=\begin {cases} \frac {\tilde {\infty } x \tan {\left (e \right )}}{\sec ^{3}{\left (e \right )}} & \text {for}\: a = 0 \wedge b = 0 \wedge f = 0 \\- \frac {1}{3 b f \sec ^{3}{\left (e + f x \right )}} & \text {for}\: a = 0 \\\frac {\log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 a f} & \text {for}\: b = 0 \\\frac {x \tan {\left (e \right )}}{a + b \sec ^{3}{\left (e \right )}} & \text {for}\: f = 0 \\- \frac {\log {\left (- \sqrt [3]{- \frac {a}{b}} + \sec {\left (e + f x \right )} \right )}}{3 a f} + \frac {\log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 a f} - \frac {\log {\left (4 \left (- \frac {a}{b}\right )^{\frac {2}{3}} + 4 \sqrt [3]{- \frac {a}{b}} \sec {\left (e + f x \right )} + 4 \sec ^{2}{\left (e + f x \right )} \right )}}{3 a f} & \text {otherwise} \end {cases} \]

[In]

integrate(tan(f*x+e)/(a+b*sec(f*x+e)**3),x)

[Out]

Piecewise((zoo*x*tan(e)/sec(e)**3, Eq(a, 0) & Eq(b, 0) & Eq(f, 0)), (-1/(3*b*f*sec(e + f*x)**3), Eq(a, 0)), (l
og(tan(e + f*x)**2 + 1)/(2*a*f), Eq(b, 0)), (x*tan(e)/(a + b*sec(e)**3), Eq(f, 0)), (-log(-(-a/b)**(1/3) + sec
(e + f*x))/(3*a*f) + log(tan(e + f*x)**2 + 1)/(2*a*f) - log(4*(-a/b)**(2/3) + 4*(-a/b)**(1/3)*sec(e + f*x) + 4
*sec(e + f*x)**2)/(3*a*f), True))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.91 \[ \int \frac {\tan (e+f x)}{a+b \sec ^3(e+f x)} \, dx=-\frac {\log \left (a \cos \left (f x + e\right )^{3} + b\right )}{3 \, a f} \]

[In]

integrate(tan(f*x+e)/(a+b*sec(f*x+e)^3),x, algorithm="maxima")

[Out]

-1/3*log(a*cos(f*x + e)^3 + b)/(a*f)

Giac [F]

\[ \int \frac {\tan (e+f x)}{a+b \sec ^3(e+f x)} \, dx=\int { \frac {\tan \left (f x + e\right )}{b \sec \left (f x + e\right )^{3} + a} \,d x } \]

[In]

integrate(tan(f*x+e)/(a+b*sec(f*x+e)^3),x, algorithm="giac")

[Out]

sage0*x

Mupad [B] (verification not implemented)

Time = 20.76 (sec) , antiderivative size = 114, normalized size of antiderivative = 4.96 \[ \int \frac {\tan (e+f x)}{a+b \sec ^3(e+f x)} \, dx=\frac {3\,\ln \left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )-\ln \left (a+b-3\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+3\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4-a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+3\,b\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+3\,b\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+b\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\right )}{3\,a\,f} \]

[In]

int(tan(e + f*x)/(a + b/cos(e + f*x)^3),x)

[Out]

(3*log(tan(e/2 + (f*x)/2)^2 + 1) - log(a + b - 3*a*tan(e/2 + (f*x)/2)^2 + 3*a*tan(e/2 + (f*x)/2)^4 - a*tan(e/2
 + (f*x)/2)^6 + 3*b*tan(e/2 + (f*x)/2)^2 + 3*b*tan(e/2 + (f*x)/2)^4 + b*tan(e/2 + (f*x)/2)^6))/(3*a*f)